//
//  UIBarButtonItem+ZY_BarButtonItem.m
//  VeiBo
//
//  Created by apple on 16/12/2.
//  Copyright © 2016年 apple. All rights reserved.
//

#import "UIBarButtonItem+ZY_BarButtonItem.h"

@implementation UIBarButtonItem (ZY_BarButtonItem)

+ (instancetype)ZY_setButtonItemImageName:(NSString *)imageName title:(NSString *)title target:(id)target action:(SEL)action
{
    UIBarButtonItem* buttonItem = [[UIBarButtonItem alloc] init];
    UIButton* button = [UIButton ZY_setImageName:imageName title:title target:target action:action];
    buttonItem = [[UIBarButtonItem alloc] initWithCustomView:button];
    
    return buttonItem;
}

@end
